<!-- HTML header for doxygen 1.8.5-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>Fat-Free Framework: Audit Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Fat-Free Framework
   &#160;<span id="projectnumber">3.3.0</span>
   &#160;<span class="menu"><a href="index.html">Overview</a> <a href="annotated.html">Class List</a> <a href="hierarchy.html">Hierarchy</a></span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classAudit-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Audit Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Data validator.  
 <a href="classAudit.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for Audit:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
 <div class="center">
  <img src="classAudit.png" usemap="#Audit_map" alt=""/>
  <map id="Audit_map" name="Audit_map">
<area href="classPrefab.html" title="Factory class for single-instance objects. " alt="Prefab" shape="rect" coords="0,0,50,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab336b765e98d6370c23174a4e8fdcabb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#ab336b765e98d6370c23174a4e8fdcabb">url</a> ($str)</td></tr>
<tr class="separator:ab336b765e98d6370c23174a4e8fdcabb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02ac097b7d0aecabd3240caa9f0da721"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#a02ac097b7d0aecabd3240caa9f0da721">email</a> ($str, $mx=TRUE)</td></tr>
<tr class="separator:a02ac097b7d0aecabd3240caa9f0da721"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad212e486cbfe86be9f5c11ad3910b815"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#ad212e486cbfe86be9f5c11ad3910b815">ipv4</a> ($addr)</td></tr>
<tr class="separator:ad212e486cbfe86be9f5c11ad3910b815"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab063234ba71915d238a52dc95a00d329"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#ab063234ba71915d238a52dc95a00d329">ipv6</a> ($addr)</td></tr>
<tr class="separator:ab063234ba71915d238a52dc95a00d329"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3a7ec3b4e409b9840568c984b210c8c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#ad3a7ec3b4e409b9840568c984b210c8c">isprivate</a> ($addr)</td></tr>
<tr class="separator:ad3a7ec3b4e409b9840568c984b210c8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae495176807f8eb67bf0594ed4093b790"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#ae495176807f8eb67bf0594ed4093b790">isreserved</a> ($addr)</td></tr>
<tr class="separator:ae495176807f8eb67bf0594ed4093b790"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca7caf71d2616e348202b3d956d6fa90"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#aca7caf71d2616e348202b3d956d6fa90">ispublic</a> ($addr)</td></tr>
<tr class="separator:aca7caf71d2616e348202b3d956d6fa90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67dde47e31fc8735a5eee934025bacb1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#a67dde47e31fc8735a5eee934025bacb1">isdesktop</a> ()</td></tr>
<tr class="separator:a67dde47e31fc8735a5eee934025bacb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa816122125e18fdd26cd2a442eab7d26"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#aa816122125e18fdd26cd2a442eab7d26">ismobile</a> ()</td></tr>
<tr class="separator:aa816122125e18fdd26cd2a442eab7d26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4eb6504047ce071cc445eba3d96b4f6f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#a4eb6504047ce071cc445eba3d96b4f6f">isbot</a> ()</td></tr>
<tr class="separator:a4eb6504047ce071cc445eba3d96b4f6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac0692b7b6ad10d1b24f38acf3c0dc83"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#aac0692b7b6ad10d1b24f38acf3c0dc83">mod10</a> ($id)</td></tr>
<tr class="separator:aac0692b7b6ad10d1b24f38acf3c0dc83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a770cba20e7000564c5fb6b5c11a20b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#a4a770cba20e7000564c5fb6b5c11a20b">card</a> ($id)</td></tr>
<tr class="separator:a4a770cba20e7000564c5fb6b5c11a20b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d749ab3e7722c44f637e531dd896e5d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAudit.html#a1d749ab3e7722c44f637e531dd896e5d">entropy</a> ($str)</td></tr>
<tr class="separator:a1d749ab3e7722c44f637e531dd896e5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:ac2fe8dda06f93939c5d8a37f08f045fd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac2fe8dda06f93939c5d8a37f08f045fd"></a>
const&#160;</td><td class="memItemRight" valign="bottom"><b>UA_Mobile</b> ='android|blackberry|iphone|ipod|palm|windows\s+ce'</td></tr>
<tr class="separator:ac2fe8dda06f93939c5d8a37f08f045fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d9f7f10576d87fa83158799fddb508d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8d9f7f10576d87fa83158799fddb508d"></a>
const&#160;</td><td class="memItemRight" valign="bottom"><b>UA_Desktop</b> ='bsd|linux|os\s+[x9]|solaris|windows'</td></tr>
<tr class="separator:a8d9f7f10576d87fa83158799fddb508d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05029f6cd6fe435d2c275ebf2c665d61"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05029f6cd6fe435d2c275ebf2c665d61"></a>
const&#160;</td><td class="memItemRight" valign="bottom"><b>UA_Bot</b> ='bot|crawl|slurp|spider'</td></tr>
<tr class="separator:a05029f6cd6fe435d2c275ebf2c665d61"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classPrefab"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classPrefab')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classPrefab.html">Prefab</a></td></tr>
<tr class="memitem:a459ac539bc012dbdb77abe0d0ebeba76 inherit pub_static_methods_classPrefab"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPrefab.html#a459ac539bc012dbdb77abe0d0ebeba76">instance</a> ()</td></tr>
<tr class="separator:a459ac539bc012dbdb77abe0d0ebeba76 inherit pub_static_methods_classPrefab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Data validator. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a4a770cba20e7000564c5fb6b5c11a20b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::card </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return credit card type if number is valid </p><dl class="section return"><dt>Returns</dt><dd>string|FALSE </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$id</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a02ac097b7d0aecabd3240caa9f0da721"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::email </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$mx</em> = <code>TRUE</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if string is a valid e-mail address; Check DNS MX records if specified </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str</td><td>string </td></tr>
    <tr><td class="paramname">$mx</td><td>boolean </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1d749ab3e7722c44f637e531dd896e5d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::entropy </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return entropy estimate of a password (NIST 800-63) </p><dl class="section return"><dt>Returns</dt><dd>int|float </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad212e486cbfe86be9f5c11ad3910b815"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::ipv4 </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if string is a valid IPV4 address </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$addr</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab063234ba71915d238a52dc95a00d329"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::ipv6 </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if string is a valid IPV6 address </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$addr</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4eb6504047ce071cc445eba3d96b4f6f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::isbot </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if user agent is a Web bot </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="a67dde47e31fc8735a5eee934025bacb1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::isdesktop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if user agent is a desktop browser </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="aa816122125e18fdd26cd2a442eab7d26"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::ismobile </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if user agent is a mobile device </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="ad3a7ec3b4e409b9840568c984b210c8c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::isprivate </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if IP address is within private range </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$addr</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aca7caf71d2616e348202b3d956d6fa90"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::ispublic </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if IP address is neither private nor reserved </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$addr</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae495176807f8eb67bf0594ed4093b790"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::isreserved </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if IP address is within reserved range </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$addr</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aac0692b7b6ad10d1b24f38acf3c0dc83"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::mod10 </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if specified ID has a valid (Luhn) Mod-10 check digit </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$id</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab336b765e98d6370c23174a4e8fdcabb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Audit::url </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Return TRUE if string is a valid URL </p><dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>audit.php</li>
</ul>
</div><!-- contents -->
